<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Notepad Test</title>

</head>
<body>
<h1>&nbsp;Notepad Test<br>
</h1>
<span style="font-weight: bold;"></span><span style="font-weight: bold;">Description:</span><br>
This test performs the following:<br>
<ul>
<li>Opens the Notepad application</li>
<li>Enters text "Hello World"</li>
<li>Sends the keystroke Ctrl+S</li>
<li>Waits for the Save As dialog to be displayed</li><li>Enters a unique filename</li><li>Clicks on Save</li><li>Waits for dialog to not be displayed</li><li>Clicks X button to close notepad</li><li>Waits for process to terminate</li>
</ul>
<span style="font-weight: bold;"></span><span style="font-weight: bold;"><br>
</span>Import Library hosted with NRobotRemote:<br>
<table style="text-align: left; width: 90%;" border="1" cellpadding="1" cellspacing="0">
<tbody>
<tr>
<td style="width: 305px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Setting</span></td>
<td style="width: 333px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Value</span></td>
<td style="width: 286px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Value</span></td>
<td style="width: 131px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Value</span></td>
<td style="background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Value</span></td>
</tr>
<tr>
<td style="width: 305px;">Library<br>
</td>
<td style="width: 333px;">Remote</td>
<td style="width: 286px;">http://localhost:8271</td>
<td style="width: 131px;">WITH NAME</td>
<td>RANOREX<br>
</td>
</tr>
</tbody>
</table>
<br>
Ranorex XPaths for controls:<br>
<table style="text-align: left; width: 60%;" border="1" cellpadding="1" cellspacing="0">
<tbody>
<tr>
<td style="width: 305px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Variable</span></td>
<td style="width: 333px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Value</span></td><td style="background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Comments</span></td>
</tr>
<tr>
<td style="width: 305px;">${Editor}<br>
</td>
<td style="width: 333px;">text[@controlid='15']<br>
</td><td># Notepad text editor</td>
</tr>
<tr>
<td>${FileName}</td>
<td>descendant::text[@controlid='1001']<br></td><td># Save As dialog filename</td>
</tr>











<tr><td>${SaveButton}</td><td>button[@text='&amp;Save']</td><td># Save As dialog save button</td></tr></tbody>
</table>
<br>
Test Case definition:<br>
<table style="text-align: left; width: 85%;" border="1" cellpadding="1" cellspacing="0">
<tbody>
<tr>
<td style="background-color: rgb(153, 153, 153); width: 15%;"><span style="font-weight: bold;">Test Case</span></td>
<td style="width: 333px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Action</span></td>
<td style="width: 286px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Argument</span></td>
<td style="width: 131px; background-color: rgb(153, 153, 153);"><span style="font-weight: bold;">Argument</span></td><td style="background-color: rgb(153, 153, 153); width: 15%;"><span style="font-weight: bold;">Argument</span></td>

</tr>
<tr>
<td>Notepad Test</td>
<td>[Setup]</td>
<td>RANOREX.APPLICATION OPEN</td>
<td>C:\\Windows\\System32\\notepad.exe</td><td></td>

</tr>
<tr>
<td></td>
<td>RANOREX.APPLICATION SET FOCUS MAIN WINDOW</td>
<td></td>
<td></td><td></td>

</tr>
<tr>
<td style="width: 305px;"></td>
<td style="width: 333px;">RANOREX.TEXTBOX SET TEXT</td>
<td style="width: 286px;">${Editor}</td>
<td style="width: 131px;">Hello World</td><td></td>

</tr>
<tr><td></td><td>RANOREX.APPLICATION SET FOCUS MAIN WINDOW</td><td></td><td></td><td></td></tr><tr>
<td style="width: 305px;"></td>
<td style="width: 333px;">RANOREX.KEYBOARD PRESS</td>
<td style="width: 286px;">{CONTROL down}{Skey}</td>
<td style="width: 131px;"></td><td></td>

</tr>
<tr>
<td></td>
<td>RANOREX.APPLICATION WAIT FOR DIALOG WINDOW</td>
<td>5</td>
<td></td><td></td>

</tr>
<tr><td></td><td>${random}=</td><td>Evaluate</td><td>random.randint(0,sys.maxint)</td><td>random,sys</td></tr><tr>
<td></td>
<td>RANOREX.TEXTBOX SET TEXT</td>
<td>${FileName}</td>
<td>helloworld_${random}.txt</td><td></td>

</tr>
<tr>
<td></td>
<td>RANOREX.BUTTON CLICK</td>
<td>${SaveButton}</td>
<td></td><td></td>

</tr>
<tr>
<td></td>
<td>RANOREX.APPLICATION WAIT FOR NO DIALOG WINDOW</td>
<td>5</td>
<td></td><td></td>

</tr>
<tr><td></td><td>RANOREX.APPLICATION CLOSE MAIN WINDOW</td><td></td><td></td><td></td></tr><tr><td></td><td>RANOREX.APPLICATION WAIT FOR TERMINATE</td><td>5</td><td></td><td></td></tr><tr>
<td></td>
<td>[Teardown]</td>
<td>RUN KEYWORD AND IGNORE ERROR</td>
<td>RANOREX.APPLICATION KILL</td><td></td>

</tr>
</tbody>
</table>
</body></html>